import { apiService } from '../../api/apiService';
import { getPrdArchByManucode } from '../../api/server';
import { reactive } from 'vue';
import { showServerError } from '../../util/MessageDeal';
export function useProductArchiveDevicesSetup () {
    const archiveObj = reactive({ prd_arch_detail: {} });
    // 获取指定manucode的产品档案信息
    const getPrdArchDetail = (params, callback) => {
        apiService({
            api: getPrdArchByManucode,
            param: { ...params },
            success: (data) => {
                archiveObj.prd_arch_detail = data.value;
                console.log(archiveObj.prd_arch_detail);
                callback && callback(data);
            },
            fail: (data) => {
                showServerError(data);
            }
        });
    };
    return {
        getPrdArchDetail,
        archiveObj
    };
}
